package kr.hkit.androidcomplete02.ch12;

import java.util.*;

import kr.hyunist.androidcomplete01.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class CustomeAdapterView02Ex extends Activity {
	ArrayList<MyItem> arLists;
	LayoutInflater inflate;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch12_listviewarraylist);
	
		arLists = new ArrayList<>();
		arLists.add(new MyItem(R.drawable.ic_launcher, "삼성 노트북"));
		arLists.add(new MyItem(R.drawable.ic_launcher, "LG 세탁기"));
		arLists.add(new MyItem(R.drawable.ic_launcher, "대우 마티즈"));
		
		MyCustomAdapter adapter = new MyCustomAdapter(this, R.layout.icontext, arLists);
		
		ListView listview = (ListView) findViewById(R.id.ch12_listView);
		listview.setAdapter(adapter);
		
	}
}
